Colin Walters [Mon, 6 Jun 2016 18:49:11 +0000 (14:49 -0400)]
tests/test-pull-c: New test that runs through the pull API via C
We have had in the past issues with running `ostree_repo_pull()`
multiple times in the same process, embarassingly enough. Nothing in
the current test suite covers this, so let's start.
Closes: #322
Approved by: jlebon
Colin Walters [Mon, 6 Jun 2016 19:00:13 +0000 (15:00 -0400)]
tests: Use strict mode by default for C tests
I was extending the C-based test suite to cover more, and noticed that
we weren't aborting if a command failed. That made the tests somewhat
less useful, so let's fix it.
Closes: #321
Approved by: jlebon
Krzesimir Nowak [Fri, 3 Jun 2016 19:35:52 +0000 (21:35 +0200)]
summary: Fix a typo
The --gpg-sign parameter will be used for signing the summary, not the
commit. This probably was copy-pasted from the ostree commit command.
Closes: #320
Approved by: cgwalters
Colin Walters [Tue, 31 May 2016 15:35:35 +0000 (11:35 -0400)]
glnx porting: Port away from gs_file_get_basename_cached()
In some cases we use glnx_basename(), in others we already had a
`GFileInfo` around with the name.
Closes: #316
Approved by: jlebon
Colin Walters [Tue, 31 May 2016 15:27:19 +0000 (11:27 -0400)]
libglnx porting: Port away from gs_file_map_noatime()
The "no atime" thing was mostly useful only before "relative atime"
updates landed. Users who care about performance will turn it off
entirely anyways.
Closes: #316
Approved by: jlebon
Colin Walters [Tue, 31 May 2016 15:53:27 +0000 (11:53 -0400)]
lib: Drop GFile variant mapping API for fd-relative
In addition to generic fd relative porting,
this is a necessary preparatory step for libglnx porting, because
when I tried to use `g_mapped_file_new` I hit an issue with
it using a different error domain from GIO.
Thankfully libglnx consistently uses the GIO error domain, and here
we're now using it for the `open()` call.
Closes: #317
Approved by: jlebon
Colin Walters [Wed, 1 Jun 2016 13:35:47 +0000 (09:35 -0400)]
lib: Change ot_util_variant_map helpers to consistently sink refs
This is similar to changes Krzesimir has been doing recently - we
really don't need the ergonomics of floating refs since we have
autocleanups.
We should continue to change most of our code to sink refs.
Specifically here it was pretty broken that the `_map()` API was
sinking but the other two weren't, and this broke some refactoring I
was trying to do later.
Closes: #317
Approved by: jlebon
Sam Spilsbury [Wed, 1 Jun 2016 08:15:00 +0000 (08:15 +0000)]
repo: Display estimated time remaining when pulling
Bug 765429 said that not having a time estimate can be annoying
when working with large pulls.
There isn't any complex time estimation logic here - we just take
the number of bytes remaining and do a linear projection of
the bytes per second rate at the current point in time.
Closes: #318
Approved by: cgwalters
Colin Walters [Sun, 29 May 2016 17:06:36 +0000 (13:06 -0400)]
core: Port to new libglnx tempname API
Drops another libgsystem use, and as bonus we malloc less too.
Closes: #311
Approved by: jlebon
Colin Walters [Mon, 30 May 2016 15:20:18 +0000 (11:20 -0400)]
sysroot: Correct error handling path in previous libglnx port
I happened to have the github page open with my commit after it was
merged, and then noticed a bug.
We still need to throw if we hit a non-`ENOENT` error.
Closes: #315
Approved by: giuseppe
Colin Walters [Sun, 29 May 2016 17:50:34 +0000 (13:50 -0400)]
libglnx porting: Port away from gs_file_ensure_directory()
The init-fs code in particular gets (IMO) a lot cleaner being fd
relative.
Closes: #312
Approved by: giuseppe
Colin Walters [Sun, 29 May 2016 17:33:25 +0000 (13:33 -0400)]
libglnx porting: Port callers of gs_file_unlink to just unlink()
In the second case it's actually less code too.
Closes: #312
Approved by: giuseppe
Colin Walters [Sun, 29 May 2016 17:29:18 +0000 (13:29 -0400)]
repo: Port uncompressed cache GC to libglnx
- Kills a user of `gs_file_unlink`
- Is fd-relative
- Is way less malloc-y.
Closes: #312
Approved by: giuseppe
Colin Walters [Sun, 29 May 2016 17:23:04 +0000 (13:23 -0400)]
libglnx porting: Port "load utf8 file" contents API callers
Closes: #312
Approved by: giuseppe
Krzesimir Nowak [Thu, 26 May 2016 09:54:28 +0000 (11:54 +0200)]
repo: Add functions for verifying any data in repository
This can be useful for validating the 3rd party data that is put in
the extensions directory and is signed with the same keys as commits
or the summary file.
Closes: #310
Approved by: cgwalters
Krzesimir Nowak [Thu, 26 May 2016 09:53:11 +0000 (11:53 +0200)]
repo: Factor out setting up a GPG verifier
Moved out setting up a GPG verifier to a separate function, as I would
like to use it for the any data verification function in the following
commit.
Closes: #310
Approved by: cgwalters
Krzesimir Nowak [Thu, 26 May 2016 09:51:13 +0000 (11:51 +0200)]
repo: Add a missing Returns paragraph
Closes: #310
Approved by: cgwalters
Krzesimir Nowak [Thu, 26 May 2016 09:48:21 +0000 (11:48 +0200)]
repo: Factor out the check of gpg result to a separate function
I plan to add a function for verifying any data which may return the
error about lack of trusted signatures, so let's avoid the redundancy
and put the check in the separate function.
Closes: #310
Approved by: cgwalters
Krzesimir Nowak [Mon, 23 May 2016 11:28:04 +0000 (13:28 +0200)]
core: Add a function creating an archive-z2 content stream
It is quite similar to the already existing
ostree_raw_file_to_content_stream function, so I factored the common
part to a separate function. The difference is that we cannot report
the size of the resulting stream.
Can be useful for serving a "bare" repository as a faked "archive-z2"
repository.
Closes: #308
Approved by: cgwalters
Mathnerd314 [Mon, 23 May 2016 19:32:36 +0000 (13:32 -0600)]
commit: Update manpage to reflect --editor
Closes: #305
Approved by: cgwalters
Mathnerd314 [Mon, 23 May 2016 18:52:56 +0000 (12:52 -0600)]
log: Display "(no subject)" for commits without a subject
This resolves the ambiguity for a message with a body but no subject,
and also hints that OSTree is using two bytes to store the empty
commit subject/body (when instead they could be stored, or rather,
not stored, as part of the metadata)
Closes: #305
Approved by: cgwalters
Mathnerd314 [Mon, 23 May 2016 18:49:37 +0000 (12:49 -0600)]
commit: Don't require a subject
In practice, a lot of subjects are empty, because the commit date
and branch are sufficient identification. For example, rpm-ostree
does not use subjects. It also doesn't use the command-line ostree
commit tool, so this was not a problem there, but this makes the
behavior consistent.
Also adds a test that empty subjects and omitting the subject
are equivalent. The --timestamp is so that the commits do not
have different timestamps.
Closes: #305
Approved by: cgwalters
Mathnerd314 [Mon, 23 May 2016 18:47:22 +0000 (12:47 -0600)]
commit: Display subject/body in commit editor
This allows automation to prefill the subject/body for the editor.
It could also be useful if some kind of "amend commit" functionality
was implemented.
Closes: #305
Approved by: cgwalters
Mathnerd314 [Mon, 23 May 2016 18:44:36 +0000 (12:44 -0600)]
commit: Add --editor / -e command line argument
Previously, the behavior was to run the editor if no subject or body was specified.
This led to using commit -s '' in scripts, to avoid running the editor.
In practice, manually editing commit messages is rare, whereas automated scripting
is common, so instead default to not running the editor and only run it when -e
is given.
Closes: #305
Approved by: cgwalters
Mathnerd314 [Mon, 23 May 2016 18:42:17 +0000 (12:42 -0600)]
commit: accept NULL subject argument
When given a NULL subject, use "" instead, like for the body argument
Closes: #305
Approved by: cgwalters
Alexander Larsson [Wed, 25 May 2016 09:00:19 +0000 (11:00 +0200)]
Build on older versions of glib
Various places need to include libglnx.h for the autoptr backport
fallbacks to be there before ostree-autocleanups.h is included.
This fixes the build on centos7ยท
Closes: #309
Approved by: giuseppe
Krzesimir Nowak [Tue, 24 May 2016 08:36:38 +0000 (10:36 +0200)]
libotutil: Plug a leak
There's no need to allocate the variant builder on a heap, so allocate
it on the stack and avoid a memory leak at the same time.
Closes: #307
Approved by: cgwalters
Giuseppe Scrivano [Mon, 23 May 2016 06:53:34 +0000 (08:53 +0200)]
man: add missing options for commit
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #306
Approved by: cgwalters
Alexander Larsson [Fri, 20 May 2016 08:59:59 +0000 (10:59 +0200)]
tests: Fix build with old glib
test-checksum.c was using g_autofree without including libglnx.h which
has the backport for that.
Closes: #304
Approved by: cgwalters
Krzesimir Nowak [Thu, 19 May 2016 12:28:25 +0000 (14:28 +0200)]
build: Install new autocleanups header
Haven't noticed before that there is a separate variable for a list of
OSTree public headers. This fixes an embarrassing error that prohibits
building a project that includes ostree.h.
Closes: #302
Approved by: cgwalters
Krzesimir Nowak [Fri, 13 May 2016 06:08:49 +0000 (08:08 +0200)]
build: Allow ostree to use g_autoptr on its types internally
As an example, I g_autoptred one OstreeRepo in the "ostree init"
command.
Closes: #295
Approved by: cgwalters
Krzesimir Nowak [Fri, 13 May 2016 05:59:10 +0000 (07:59 +0200)]
build: Remind about bumping related versions
Closes: #295
Approved by: cgwalters
Krzesimir Nowak [Thu, 12 May 2016 12:42:26 +0000 (14:42 +0200)]
libostree: Add g_autoptr() support for the public types
To avoid breaking the ostree users we hide the autoptr setup behind an
OSTREE_WITH_AUTOCLEANUPS variable. The variable is set to 0 by
default, so users that want to start using them, have to define the
variable themselves to 1.
Probably after some transition period, the variable will be set 1 by
default.
This is conditional on GLib >= 2.44.0 being available. It does not
bump ostree's dependency on GLib.
Closes: #295
Approved by: cgwalters
Gatis Paeglis [Thu, 12 May 2016 12:42:38 +0000 (14:42 +0200)]
Fix build when have_libsoup_client_certs=no
This fixes a build failure with older libsoup versions
that do not have the client certificates feature.
Closes: #294
Approved by: cgwalters
Colin Walters [Fri, 13 May 2016 13:59:26 +0000 (09:59 -0400)]
README: x/xdg-app/flatpak/
I'm mostly just testing some Homu updates.
Closes: #299
Approved by: cgwalters
Krzesimir Nowak [Fri, 13 May 2016 11:34:57 +0000 (13:34 +0200)]
libostree: Fix bracket-missing warnings
Apparently I got the bracketing wrong in
862e6ecdcc58f025696b1394adfc0fcf7322df23:
src/libostree/ostree-repo.c: In function 'ostree_repo_delete_object':
src/libostree/ostree-repo.c:3538:11: warning: missing braces around
initializer [-Wmissing-braces]
g_auto(GVariantBuilder) builder = {0,};
Closes: #298
Approved by: cgwalters
Micah Abbott [Thu, 12 May 2016 20:54:06 +0000 (16:54 -0400)]
docs: fix swapped link syntax
A few links in the docs had the Markdown syntax swapped like:
(link title)[link url]
Just cleaned up those. Verified via `mkdocs serve`
Closes: #297
Approved by: cgwalters
Colin Walters [Thu, 12 May 2016 14:15:24 +0000 (10:15 -0400)]
build: Don't run glib-mkenums if there's nothing to do
This fixes the build without libsoup.
Closes: #296
Approved by: gatispaeglis
Colin Walters [Thu, 12 May 2016 14:32:17 +0000 (10:32 -0400)]
Make enum generation private by default, export stub symbol
When we added enum type generation, the generated symbols used
the `ostree_` prefix, and at the time that implied they were public.
So we started (if built with libsoup) exporting
`ostree_fetcher_config_flags_get_type`.
I think it's not worth confusing ABI checkers, so let's export the
dummy symbol forever, and switch enums to be private by default.
We should revisit this and also export some auto-generated enum
types for public enums, but that's a separate patch.
Closes: #296
Approved by: gatispaeglis
Sam Spilsbury [Tue, 21 Jul 2015 00:16:14 +0000 (08:16 +0800)]
Makefile: Move to AM_DISTCHECK_CONFIGURE_FLAGS
Since automake 1.11.2 it is recommended that packages
use AM_DISTCHECK_CONFIGURE_FLAGS instead of
DISTCHECK_CONFIGURE_FLAGS as the latter is intended
to be a user variable.
https://bugzilla.gnome.org/show_bug.cgi?id=766298
Closes: #293
Approved by: cgwalters
Krzesimir Nowak [Wed, 11 May 2016 09:04:04 +0000 (11:04 +0200)]
libostree: Variant-related leak plugs and fixes
This tries to avoid leaking GVariantBuilders and GVariants in some
situations. The leaks were usually happening when some error occurred
or because of unclear variant ownership situation.
The former is mostly about making sure that g_variant_builder_clear is
called on builders that didn't finish their variant building process.
The latter is surely more work - sometimes the result of
g_variant_builder_end() should not be passed directly to a function,
but rather stored in a g_autoptr(GVariant), sunk and then passed to a
function. IMO, with an advent of g_autoptr, GVariants should be always
sunk instead of relying on some receiver function sinking it. This
would make an easy-to-follow policy of always sinking your
variants. Functions could then assume that the passed variant is
already sunk. These leaks are still happenning in commands, but they
are less harmful, since that code will not be used by some daemon as a
library routine.
Closes: #291
Approved by: cgwalters
Krzesimir Nowak [Tue, 10 May 2016 10:45:49 +0000 (12:45 +0200)]
repo: Allow using options for fetching summary
This adds a _with_options variant of the
ostree_repo_remote_fetch_summary function, so we can tell the fetcher
to use a specific URL instead taking it from the remote config.
Closes: #290
Approved by: cgwalters
Krzesimir Nowak [Tue, 10 May 2016 10:23:03 +0000 (12:23 +0200)]
repo: Plug a leak
The base URI created in this line was always (sans erroneous
situations) overwritten in the code block below without freeing it
previously, so it leaked.
Closes: #290
Approved by: cgwalters
Krzesimir Nowak [Tue, 10 May 2016 09:59:12 +0000 (11:59 +0200)]
core: Improve variant format docs
Use markdown to actually format the tuple member descriptions as a
list. Currently they are hardly legible as gtk-doc formats them into a
single sentence.
Also update the additional metadata docs in the summary objects.
Closes: #289
Approved by: cgwalters
Jonathan Lebon [Wed, 13 Apr 2016 20:44:21 +0000 (16:44 -0400)]
OstreeRepo: add extensions directory
It's very useful for third-party applications to have someplace to store
their data guaranteed to be on the same device as the repo (thus
ensuring hardlinks) while still being shielded away from any of OSTree's
timely garbage collections.
We create a new "extensions/" subdirectory where apps can include
whatever they wish in "extensions/myapp/". This subdirectory is
completely unmanaged by ostree.
NB: I didn't bother making it a member of the OstreeRepo proper since we
don't really use it for anything else yet.
Closes: #286
Approved by: cgwalters
Krzesimir Nowak [Mon, 9 May 2016 13:11:18 +0000 (15:11 +0200)]
sysroot: Plug some leaks
The deployments and booted deployment were never unreffed.
Also, remote (void) from the call to the unload function - it returns
nothing, so there is no need to fool the compiler.
Closes: #287
Approved by: cgwalters
Colin Walters [Sat, 7 May 2016 15:22:47 +0000 (11:22 -0400)]
trivial-httpd: Add __attribute__((format))
I was briefly looking at building with clang mostly since it
detects unused variables with cleanup attributes, but then
I hit this fatal error.
It's a hard compile error with `-Wformat-nonliteral` since clang
doesn't know it's a format string.
Colin Walters [Fri, 6 May 2016 16:25:27 +0000 (12:25 -0400)]
build: Use --std=gnu99
It's actually very nice to be able to declare loop variables inside
the initializer.
Ideally we could turn off nested functions though.
Closes: #284
Approved by: jlebon
Jonathan Lebon [Fri, 22 Apr 2016 16:42:05 +0000 (12:42 -0400)]
tests/test-libarchive-import.c: add tests
- Do a bit of refactoring
- Add test for use_ostree_convention
- Add test for xattr_callback
- Add test for SELinux labeling
Closes: #275
Approved by: cgwalters
Jonathan Lebon [Fri, 22 Apr 2016 16:39:54 +0000 (12:39 -0400)]
tests/test-libarchive.sh: add more test
- Test both tar and cpio archives
- Test more hardlink corner cases
- Test symlinks more rigorously
- Test stat override
- Test skip list
Closes: #275
Approved by: cgwalters
Jonathan Lebon [Fri, 22 Apr 2016 16:35:48 +0000 (12:35 -0400)]
ot-builtin-commit.c: add --skip-list option
This was already supported by the commit modifier API, just needed to
expose it. This will also be used to test the libarchive API in a future
test.
Closes: #275
Approved by: cgwalters
Jonathan Lebon [Fri, 22 Apr 2016 16:24:04 +0000 (12:24 -0400)]
ostree-repo-libarchive.c: major refactor
- Make hardlink handling more generic. The previous strategy worked for
tar archives, but not for cpio. It now works for both.
- Add support for SEL labeling (through the OstreeRepoCommitModifier)
- Add support for xattr_callback (through the OstreeRepoCommitModifier)
- Add support for filter (through the OstreeRepoCommitModifier)
- Add a use_ostree_convention option
Closes: #275
Approved by: cgwalters
Colin Walters [Tue, 3 May 2016 21:24:25 +0000 (17:24 -0400)]
libglnx porting: Migrate to glnx_stream_fstat()
I ended up deciding to move this one into libglnx, seems like
something other libglnx-using software might want to do, even though
xdg-app doesn't right now.
Closes: #282
Approved by: jlebon
Colin Walters [Thu, 5 May 2016 21:20:04 +0000 (17:20 -0400)]
lib: Add more filename validations (no ., .. or /) in commit logic
The filesystem commit code will never give us potentially hostile
filenames, and when importing from archives, we do some validation.
However, we should be extra paranoid and also add error messages in
the mtree in case someone tries to import a hostile
libarchive-supported format.
Closes: #283
Approved by: jlebon
Colin Walters [Mon, 21 Mar 2016 21:54:45 +0000 (17:54 -0400)]
repo: Make repo/tmp expiry configurable via tmp-expiry-seconds
We were arbitrarily only deleting content after exactly one day. Some
use cases may want something else; make it configurable.
Closes: #170
Approved by: jlebon
Colin Walters [Wed, 13 Jan 2016 16:33:54 +0000 (11:33 -0500)]
repo: Clean up staging directory for previous boot IDs
We had a policy of cleaning up all files in `$repo/tmp` older
than one day, but we should really clean up previous bootid staging
directories too, as they can potentially take up a lot of disk space.
https://bugzilla.gnome.org/show_bug.cgi?id=760531
Closes: #170
Approved by: jlebon
Colin Walters [Tue, 19 Apr 2016 19:19:46 +0000 (15:19 -0400)]
repo: Add OSTREE_BOOTID override envvar for debugging
It's useful for test cases to be able to influence this.
Conflicts:
src/libostree/ostree-repo.c
Closes: #170
Approved by: jlebon
Colin Walters [Tue, 19 Apr 2016 16:11:01 +0000 (12:11 -0400)]
repo: Add OSTREE_REPO_TEST_ERROR=pre-commit env var
Setting this causes commit to error out. There are other ways we
could do this in a more sophisticated fashion, such as via SystemTap
etc. But this has low-tech applicablity, works as non-root.
The reason I'm adding this is so that we can add test cases for
cleanup of the `tmp/staging-` directory.
Closes: #170
Approved by: jlebon
Colin Walters [Mon, 2 May 2016 14:20:46 +0000 (10:20 -0400)]
repo: Fix reading repos on read-only media
I have a cache drive I often mount read-only, and the previous commit
for opening `tmp/cache` broke since `errno == EROFS`, not `EPERM`.
It turns out we already had the concept of a "writable" repo, so just
piggy back off that.
Closes: #281
Approved by: giuseppe
Colin Walters [Sun, 1 May 2016 18:22:52 +0000 (14:22 -0400)]
libglnx porting: Migrate from GSConsole
To GLnxConsoleRef. There were some subtleties here, for example we
used to reference `GSConsole` inside the progress changed function,
which at first seems like an ABI hazard, because e.g. rpm-ostree or
xdg-app could still be passing a `GSConsole` instance there. Luckily,
it turns out to be compatible to just start calling libglnx here.
Another issue was that due to libglnx's use of the cleanup function,
we needed to ensure we always called `ostree_async_progress_finish()`
*before* the cleanup function was invoked.
Closes: #280
Approved by: giuseppe
Colin Walters [Thu, 28 Apr 2016 15:34:27 +0000 (11:34 -0400)]
build: Introduce --with-dracut=yesbutnoconf
It's actually just easier for build systems (e.g. rpm-ostree)
using dracut to use `--add ostree` rather than indirecting
through the conf file.
This makes it easier for yum-managed systems to install ostree without
side effects.
Closes: #279
Approved by: gatispaeglis
Colin Walters [Mon, 25 Apr 2016 19:59:36 +0000 (15:59 -0400)]
deploy: Start hardlinking kernel/initramfs on single-part again
Commit
https://github.com/ostreedev/ostree/commit/
1810de2b51680dbf35fdbd33d0a8d7e65eadc91f
lost an optimization where we would try hardlinks for the
kernel/initramfs in `/boot`. This would be a noticeable space savings
on single-partition systems.
Closes: #277
Approved by: gatispaeglis
Simon McVittie [Mon, 25 Apr 2016 11:50:32 +0000 (12:50 +0100)]
test-parent: this test requires user xattrs
Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #278
Approved by: cgwalters
Gatis Paeglis [Mon, 25 Apr 2016 11:57:03 +0000 (13:57 +0200)]
Fix --enable_rofiles_fuse=no build
Closes: #276
Approved by: cgwalters
Alexander Larsson [Fri, 22 Apr 2016 08:28:53 +0000 (10:28 +0200)]
repo: Handle parent repos with different remote configuration
In the case we have a repo with a parent, and the child repo has a
remote called "foo", but some option is unset. Then when we look up
the parent repo for a value before using the default we will fail due
to the parent not having the "foo" remote. As soon as we find the
requested remote at some point in the hierarchy we need to ignore further
errors and use the default value.
Closes: #274
Approved by: giuseppe
Krzesimir Nowak [Fri, 22 Apr 2016 12:41:04 +0000 (14:41 +0200)]
tests: Add a test for ostree pull --url
Closes: #271
Approved by: cgwalters
Krzesimir Nowak [Fri, 22 Apr 2016 12:40:05 +0000 (14:40 +0200)]
trivial-httpd: Add a --log-file option
Might be useful to see what files the client wants to fetch.
Closes: #271
Approved by: cgwalters
Krzesimir Nowak [Wed, 20 Apr 2016 08:34:04 +0000 (10:34 +0200)]
pull: Add a --url option
This allows ostree to pull the objects from a different URL without
modifying the repo's config.
Closes: #271
Approved by: cgwalters
Krzesimir Nowak [Tue, 19 Apr 2016 09:32:14 +0000 (11:32 +0200)]
lib: Add URL override pull option
The "override-url" option allows to use the other URL while still
using some options from the passed remote.
Closes: #271
Approved by: cgwalters
Alexander Larsson [Fri, 22 Apr 2016 07:29:59 +0000 (09:29 +0200)]
repo: Fix temporary directory allocation
We looked for and locked old temporary directories so we can
reuse them if not in use. However, once we found one that
we can reuse we didn't stop iterating, and eventually we
reached the end. This means we can lock multiple dirs.
Closes: #273
Approved by: giuseppe
Colin Walters [Thu, 21 Apr 2016 19:14:51 +0000 (15:14 -0400)]
repo: Simplify internal has_object() lookup code
There was some leftover intermediate cruft here I noticed
while reviewing another patch:
- We had an output `GFile*` for that was never used
- We required the caller to allocate the loose pathbuf, but
none of them ever reused it
- We had an extra intermediate function
Also while looking at this, I'm now uncertain whether some of the
callers of `_ostree_repo_has_loose_object` should really be invoking
`ostree_repo_has_object()`, but let's leave that aside for now.
Closes: #272
Approved by: alexlarsson
Alexander Larsson [Wed, 20 Apr 2016 13:33:44 +0000 (15:33 +0200)]
repo: Allow loading files staged in the transaction
Currently we can load metadata from the stage dir, but not file
data, which makes no sense.
Closes: #269
Approved by: cgwalters
Gatis Paeglis [Wed, 20 Apr 2016 14:22:36 +0000 (16:22 +0200)]
Remove unused variables from install_deployment_kernel
Closes: #270
Approved by: cgwalters
Alexander Larsson [Mon, 18 Apr 2016 12:26:02 +0000 (14:26 +0200)]
ostree export: Add --prefix option
This lets you set a prefix for the resulting archive patsh.
Especially useful in combination with --subpath, for instance
--subpath=subdir --prefix=subdir to extract just subdir.
Closes: #265
Approved by: cgwalters
Alexander Larsson [Mon, 18 Apr 2016 12:17:08 +0000 (14:17 +0200)]
ostree export: Add --subpath support
This lets you export a subset of a commit.
Closes: #265
Approved by: cgwalters
Krzesimir Nowak [Tue, 19 Apr 2016 08:57:27 +0000 (10:57 +0200)]
tests, lib: Remove unused variables
Closes: #267
Approved by: cgwalters
Krzesimir Nowak [Tue, 19 Apr 2016 08:56:13 +0000 (10:56 +0200)]
lib: Fix an introspection annotation
The "allow-none" annotation does not make sense for a plain boolean
parameter.
Closes: #267
Approved by: cgwalters
Krzesimir Nowak [Tue, 19 Apr 2016 08:43:32 +0000 (10:43 +0200)]
trivial-httpd: Remove useless code
Closes: #267
Approved by: cgwalters
Krzesimir Nowak [Tue, 19 Apr 2016 08:42:51 +0000 (10:42 +0200)]
lib: Fix a typo
Closes: #267
Approved by: cgwalters
Colin Walters [Mon, 18 Apr 2016 14:25:32 +0000 (10:25 -0400)]
libtest: Skip FUSE if CAP_SYS_ADMIN not in bounding set
I'm not sure if something changed or there was a race condition , or
if extraterrestrials intervened to make the tests pass before, but
in the Docker container `/dev/fuse` does exist and since we appear
to be running as uid 0 it'll be writable.
We previously discussed that another requirement for FUSE (and most
setuid binaries) is having `CAP_SYS_ADMIN`, so let's check for that in
the bounding set too.
Closes: #266
Approved by: jlebon
Simon McVittie [Sun, 17 Apr 2016 08:57:06 +0000 (09:57 +0100)]
libtest: show files' contents when assertions about them fail
I've seen an intermittent test failure in an autobuilder (sbuild)
environment where logs from failed builds cannot be retrieved,
but I can no longer reproduce it. Put the contents of the offending
file in the test's failing output so that if the failure comes back,
it can be debugged.
Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #264
Approved by: cgwalters
Colin Walters [Fri, 15 Apr 2016 19:49:05 +0000 (15:49 -0400)]
Rename test-abi to test-symbols, start verifying symbols are documented
We keep forgetting to update `apidoc/ostree-sections.txt`, so let's
start enforcing it. Of course it turns out we had some bugs here
like symbols marked as public but never implemented, etc. Those
are fixed in the prior commits.
Closes: #263
Approved by: giuseppe
Colin Walters [Fri, 15 Apr 2016 19:51:51 +0000 (15:51 -0400)]
lib: Remove ostree_repo_file_make_empty_tree
This was removed in
14d682305b9c8d65e46f0aaf31e6851cf2042193 - long
before we had a stable library.
I again claim removing unimplemented symbols from the header is not an
API/ABI break.
Closes: #263
Approved by: giuseppe
Colin Walters [Fri, 15 Apr 2016 19:20:57 +0000 (15:20 -0400)]
core: Remove ostree_checksum_update_meta that was not implemented
If a symbol falls in a git merkle tree forest, but no one hears it,
did it ever exist?
I'm claiming this isn't an API/ABI break because nothing could
have actually used this. `git log -S checksum_update_meta` leads
me to
38ef75e6e04f7ec19844f9a1c178e6066682d13d which was before
we really had a stable shared library.
Closes: #263
Approved by: giuseppe
Colin Walters [Fri, 15 Apr 2016 14:51:39 +0000 (10:51 -0400)]
Release 2016.5
Closes: #261
Approved by: cgwalters
Alexander Larsson [Fri, 15 Apr 2016 08:01:42 +0000 (10:01 +0200)]
static-delta: Initialize read_source_fd to -1
If not, we'll get ESPIPE when seeking on fd 0.
Closes: #260
Approved by: cgwalters
Alexander Larsson [Thu, 14 Apr 2016 18:55:28 +0000 (20:55 +0200)]
static-delta: Put temp files in /var/tmp
We may not have write permissions in the current directory.
Closes: #259
Approved by: cgwalters
Colin Walters [Wed, 13 Apr 2016 13:28:30 +0000 (09:28 -0400)]
refs: Add g_prefix_error around opendir for easier debugging
Addresses:
https://github.com/projectatomic/rpm-ostree/issues/264
We should consider moving this down into `glnx_opendirat`, but for now
a quick fix.
Closes: #255
Approved by: jlebon
Alexander Larsson [Fri, 8 Apr 2016 15:00:59 +0000 (17:00 +0200)]
Look for $remotename.trustedkeys.gpg in remotes.d dir
This is a nice way to add gpg keys for system configured remotes
without making them globally trusted.
Closes: #247
Approved by: cgwalters
Alexander Larsson [Fri, 8 Apr 2016 14:59:12 +0000 (16:59 +0200)]
Add remotes-config-dir to OstreeRepo
This allows you to replace the default
$sysroot/$sysconfdir/ostree/repos.d string value, and to use a similar
feature for repos that are not the system repo.
In particular, this allows us to support /etc/xdg-app/remotes.d for
xdg-app.
Closes: #247
Approved by: cgwalters
Colin Walters [Thu, 14 Apr 2016 15:05:22 +0000 (11:05 -0400)]
man: Elaborate on per-remote GPG
Closes: #258
Approved by: alexlarsson
Alexander Larsson [Mon, 11 Apr 2016 10:43:07 +0000 (12:43 +0200)]
Add OstreeRepo option for an out-of-band cache dir
This allows you to have a writable cache dir even for a system-owned
repository.
Closes: #250
Approved by: cgwalters
Alexander Larsson [Mon, 11 Apr 2016 08:25:40 +0000 (10:25 +0200)]
Add cache_dir_fd to OstreeRepo
This will allow us later to easily swap out the cache dir.
Closes: #250
Approved by: cgwalters
Alexander Larsson [Wed, 13 Apr 2016 19:18:19 +0000 (21:18 +0200)]
commit: Fix crash if dfd_iter is NULL
in write_directory_content_to_mtree_internal dfd_iter can be NULL,
for instance if commiting from --tree=ref=FOO. Don't blindly de-ref
it to avoid crashing.
Closes: #256
Approved by: cgwalters
Alexander Larsson [Wed, 13 Apr 2016 09:14:20 +0000 (11:14 +0200)]
fetcher: Initialize output_stream_set_lock mutex
ostree pull-local crashed for me in thread_closure_unref () doing:
g_mutex_clear (&thread_closure->output_stream_set_lock);
Seems like we never initialize this mutex.
Closes: #254
Approved by: cgwalters
Gatis Paeglis [Tue, 12 Apr 2016 09:26:27 +0000 (11:26 +0200)]
Fix AS_HELP_STRING for builtin grub2 mkconfig
Closes: #253
Approved by: giuseppe
Colin Walters [Fri, 8 Apr 2016 14:28:17 +0000 (10:28 -0400)]
build: Move grub2-15_ostree back to pkglibexecdir
It's not quite namespaced enough to have
`/usr/libexec/grub2-15_ostree`, and the Fedora spec file expects
things in `/usr/libexec/ostree`. Changing the spec file would be
annoying as we'd need conditionals.
Closes: #249
Approved by: gatispaeglis
Colin Walters [Tue, 5 Apr 2016 19:37:32 +0000 (15:37 -0400)]
pull: More consistently use remote_repo_local for local repos
I think it's cleaner if we use `remote_repo_local` to know
that we have a local repo. In reality, it might be nicest
if we didn't even create an `OstreeFetcher` for this case,
but untangling the code is tricky.
Closes: #239
Approved by: alexlarsson
Jonathan Lebon [Mon, 11 Apr 2016 13:27:35 +0000 (09:27 -0400)]
ostree-repo-pull: always initialize flags_i
Otherwise we get undefined behaviour if the client didn't explicitly set
any flags.
Also, add documentation for all the other options supported by
ostree_repo_pull_with_options().
Closes: #252
Approved by: cgwalters
Alexander Larsson [Mon, 11 Apr 2016 10:46:57 +0000 (12:46 +0200)]
Fix the symbol versions for ostree_repo_get_remote_*option
These were accidentally added to 2016.4 instead of 2016.5
Closes: #251
Approved by: cgwalters